<!--#include file="pjson.asp"-->
<!DOCTYPE html>
<html>
<head>
  <title></title>
<%
  dim tn
  tn="log1"
  sessionExpire
  easp.include "h.asp"
%>
  <style type="text/css">
  .layui-form-label {
	width: 80px;
	text-align: left;
}
.reply{display: none; position: absolute; right: 0; bottom: 12px;}
li:hover .reply{display: block;}
  </style>
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-card"><br>
      <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="test_form">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">检索</label>
            <div class="layui-input-block">
              <input type="text" lay-filter="log1_search" id="log1_search" name="<%=tn%>_search" class="layui-input" value="<%=val("log1_search")%>">
            </div>
          </div>
          <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="<%=tn%>_search">
              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
			   <button type="button" class="layui-btn" data-id=50 lay-submit lay-filter="<%=tn%>_add2">新增工单</button>		
         </div>
        </div>
      </div>

      <div class="layui-card-body">
<dl class="layuiadmin-card-status">
<%
	dim i,arr,title_
  hi "page",val("page")
	sql="select id,equipmentId,repairerId,questionDescription,[declare],declareTele,submitTime,[status],name1,equipmentname,typ,typ_name,repairerId,truename from v_log1   where (1=1) and (2=2) and (3=3) and (5=5) and (6=6) order by id desc"
  if val("log1_search")<>"" then
    sql=replace(sql,"1=1","questionDescription like '%"& val("log1_search") &"%'")
  end if
  
  arr= sql2arr2(sql)
	if ubound(arr)>0 then
		for i=0 to ubound(arr,2)
			title_=arr(3,i)
			echo myjs1 ("log1_div.html","status|" & arr(8,i) &",truename|"& arr(13,i) & ",data-id|"& arr(0,i) & ",content|"&title_&",time|"&arr(6,i))
		next
	end if
   
%>
</dl> 
<div id="test1"></div>
	  </div>
    </div>
  </div>
  <script src="/<%=rootpath%>/src/layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '/<%=rootpath%>/src/layuiadmin/'
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index','form','admin','laypage'], function(){
    var $ = layui.$
    ,admin=layui.admin
    ,laypage = layui.laypage
    ,form = layui.form;
    $('#log1_search').focus();
  laypage.render({
    elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
    ,count: <%=Easp.Db.PageRecordCount%> 
    ,limit: <%=Easp.Db.PageSize%>
    ,jump: function(obj, first){
    if(!first){
      $.ajax({
            url:'pj2.asp?action=div_test&page='+obj.curr+"&log1_search="+$('#log1_search').val(),
            success:function(res){//res台返回的数据，视情况看是否需要加个下
                  //alert(res);
                layer.msg('第 '+ obj.curr +' 页');
                $('dl.layuiadmin-card-status').html(res);
                $('#page').val(obj.curr);
              },
            error:function(error){
                    alert('数据加载失败');
            }
        });
    }
  }
  });

  admin.events.log1_upd = function(othis){
    var $ = layui.$;
    var nid = othis.data('id');
		window.location.href = 'log1_frm2.asp?now=' + new Date().getTime()+"&id="+nid;
  };
    form.on('submit(<%=tn%>_search)', function(data){
 	  var field = data.field;
      window.location.href = "http://ab.yjk99.net/dzps/src/views/xxk/log1_ml.asp?log1_search="+$('#log1_search').val();
    });	

  });
  </script>
</body>
</html>